home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / ptool.arc / PTOOLSCR.PAS < prev    next >
Pascal/Delphi Source File  |  1985-06-06  |  3KB  |  97 lines

  1. Program PTOOLSCR;  {Copyright  R D Ostrander
  2.                                Ostrander Data Services
  3.                                5437 Honey Manor Dr
  4.                                Indianapolis  IN  46241
  5.  
  6.      This is a demonstration program for the Turbo Pascal subroutine PTOOLSCR
  7.      for record editting and displaying. Address any questions to the author
  8.      at the above address.                                                   }
  9.  
  10. { $ C - } { This parameter is optional - the PTOOLENT subroutine will identify
  11.             and report Ctrl-Break during field editting.                      }
  12.  
  13. {$V-}     { This parameter is necessary in order to pass String parameters
  14.             of other than 80 characters.                                   }
  15.  
  16.  
  17.  
  18. {$I PTOOLENT.INC}  {Include statement for PTOOLENT procedure}
  19. {$I PTOOLSCR.INC}  {Include statement for PTOOLSCR procedure}
  20.  
  21.  
  22. CONST
  23.  
  24. ScreenTable : Array [1..6] of PTOOLSCR_Field_Array
  25.             =('D0101Editting Area Below - Press Esc to quit   0 0 0 00',
  26.               'S0503Last Name :                             0011703240',
  27.               'B0605Your Age :                              0261705020',
  28.               'C2405Your First Initial :                    0274505010',
  29.               'R0107Your Zip Code :                         0281707050',
  30.               'I0109Pick a number between -32765 and 32767  0344109060');
  31.  
  32. DisplayTable : Array [1..6] of PTOOLSCR_Field_Array
  33.              =('D0101You entered :                             0 0 0 00',
  34.                'C0000                                        0270703010',
  35.                'S0103Name                                    0010903240',
  36.                'B0205Age                                     0260705020',
  37.                'R0207Zip                                     0280707050',
  38.                'I0409#                                       0340709060');
  39.  
  40.  
  41. TYPE
  42.  
  43.      TestRecord = Record
  44.                     YourName  : String [24];
  45.                     YourAge   : Byte;
  46.                     YourInit  : Char;
  47.                     YourZip   : Real;
  48.                     YourNum   : Integer;
  49.                   End;
  50.  
  51.  
  52. VAR
  53.  
  54.      Test       : TestRecord;
  55.      ReturnCode : Integer;
  56.      LastField  : Integer;
  57.  
  58.  
  59. BEGIN
  60.  
  61. ClrScr;
  62. Gotoxy (29,2); Write ('Demonstration of PTOOLSCR procedure.');
  63. Gotoxy (29,4); Write ('PTOOLSCR and this program are copyrights');
  64. Gotoxy (29,5); Write ('of R D Ostrander');
  65. Gotoxy (29,6); Write ('   Ostrander Data Services');
  66. Gotoxy (29,7); Write ('   5437 Honey Manor Dr');
  67. Gotoxy (29,8); Write ('   Indianapolis  IN  46241');
  68. Gotoxy (29,10); Write ('and have been placed in the public domain.');
  69.  
  70. ReturnCode := 1;
  71. With Test do
  72.      Begin
  73.      YourName := ' ';
  74.      YourAge  := 0;
  75.      YourInit := ' ';
  76.      YourZip  := 0;
  77.      YourNum  := 0;
  78.      End;
  79.  
  80. While ReturnCode <> 0 do
  81.       Begin
  82.       Window (33, 13, 80, 25);
  83.       PTOOLSCR (Test, ScreenTable, 6, ReturnCode, LastField, ' ', ' ', 1);
  84.       Window (1, 13, 32, 25);
  85.       PTOOLSCR (Test, DisplayTable, 6, ReturnCode, LastField, 'D', ' ', 1);
  86.       Window (1, 1, 80, 25);
  87.       With Test do
  88.            Begin
  89.            Gotoxy (1,9);
  90.            Writeln ('Return Code: ', ReturnCode:3);
  91.            Writeln ('  LastField: ', LastField:3);
  92.            End;
  93.       End;
  94.  
  95. Gotoxy (1,24);
  96. END.
  97.